//package com.ruoyi.activiti.modeler.support;
//
//import org.activiti.bpmn.model.UserTask;
//import org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
//import org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior;
//import org.activiti.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior;
//import org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior;
//import org.activiti.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory;
//import org.activiti.engine.impl.pvm.process.ActivityImpl;
//import org.activiti.engine.impl.task.TaskDefinition;
//import org.springframework.beans.factory.annotation.Autowired;
//
//public class ActivityBehaviorFactorySupport extends DefaultActivityBehaviorFactory {
//
//    @Autowired
//    private ParticipantManager participantManager;
//
//    @Override
//    public UserTaskActivityBehavior createUserTaskActivityBehavior(UserTask userTask, TaskDefinition taskDefinition) {
//        // return super.createUserTaskActivityBehavior(userTask, taskDefinition);
//        return new UserTaskActivityBehaviorSupport(participantManager, userTask, taskDefinition);
//    }
//
//    @Override
//    public SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(ActivityImpl activity,
//                                                                                 AbstractBpmnActivityBehavior innerActivityBehavior) {
//        return new MultiInstanceBehaviorSupport.SequentialMultiInstanceBehaviorSupport(activity, innerActivityBehavior);
//    }
//
//    @Override
//    public ParallelMultiInstanceBehavior createParallelMultiInstanceBehavior(ActivityImpl activity,
//                                                                             AbstractBpmnActivityBehavior innerActivityBehavior) {
//        return new MultiInstanceBehaviorSupport.ParallelMultiInstanceBehaviorSupport(activity, innerActivityBehavior);
//    }
//}
